﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;

namespace Kokomo.Environment
{
	class DocumentMultiViewGroup
	{
		public DocumentMultiViewGroup()
		{
			this._viewModels = new ObservableCollection<DocumentViewModel>();
			this._viewModels.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(ViewModels_CollectionChanged);
		}

		void ViewModels_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
		{
			this.OnChanged();
		}

		public event EventHandler Changed;
		protected virtual void OnChanged()
		{
			if (this.Changed != null) this.Changed(this, EventArgs.Empty);
		}

		private ObservableCollection<DocumentViewModel> _viewModels;
		public IList<DocumentViewModel> ViewModels { get { return this._viewModels; } }
	}
}
